package com.ruoyi.web.controller.mobile;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.mobile.domain.CheckinRecord;
import com.ruoyi.mobile.service.ICheckinRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 打卡记录Controller
 * 
 * @author ruoyi
 * @date 2022-10-05
 */
@RestController
@RequestMapping("/mobile/checkin")
public class CheckinRecordController extends BaseController
{
    @Autowired
    private ICheckinRecordService checkinRecordService;

    /**
     * 查询打卡记录列表
     */
    @PreAuthorize("@ss.hasPermi('mobile:chckin:list')")
    @GetMapping("/list")
    public TableDataInfo list(CheckinRecord checkinRecord)
    {
        startPage();
        List<CheckinRecord> list = checkinRecordService.selectCheckinRecordList(checkinRecord);
        return getDataTable(list);
    }
}
